import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import Home from "@/components/Home";
import About from "@/components/About";
import Document from "@/components/Document";
import NotFound from "@/components/404";
const router = new VueRouter({
  mode :'history',
  routes: [
    {
      path: "/",
      component: Home
    },
    {
      path: "/document",
      component: Document
    },
    {
      path: "/about",
      component: About
    },{
      
      path: "*",
      //配置一个404页面
      // component:NotFound
      //也可以做一个重定向
      redirect:"/"
    }

  ]
});

export default router;
